package com.witframework.baseapp.security;

import javax.persistence.Column;

import com.witframework.core.BaseEntity;
import com.witframework.core.annotations.Wit;


@Wit(cnname = "数据授权实体",description="用于数据权限管理的实体")
//@Entity@Table(name = "AD_DATASETAUTH") 
//@Entity()
public class DataSetAuth extends BaseEntity{
	@Column(length = 32)
	private String user_id;
	@Wit(cnname = "用户",description="可以对用户进行数据授权")
	@Column(length = 60)
	private String username;
	
	@Wit(cnname = "角色ID",description="也可以对用户进行数据授权")
	@Column(length = 32)
	private String roleId;
	
	@Wit(cnname = "实体分类",description="目标控制数据的分类标识")
	@Column(length = 60,nullable = false)
	private String category;
	
	@Wit(cnname = "目标",description="权限实施的目标")
	@Column(length = 128,nullable = false)
	private String target;
	@Wit(cnname = "目标名称",description="权限实施的目标名称")
	@Column(length = 128,nullable = false)
	private String targetname;
	
	@Wit(cnname = "实体标识",description="授予用户或角色的目标控制数据的个体标识")
	@Column(length = 60)
	private String identifier;
	
	@Wit(cnname = "实体名称",description="授予用户或角色的目标控制数据的个体名称")
	@Column(length = 100)
	private String name;	
	
	private String usercnname;
	public String getUsercnname() {
		return usercnname;
	}

	public void setUsercnname(String usercnname) {
		this.usercnname = usercnname;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}


	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public String getIdentifier() {
		return identifier;
	}

	public void setIdentifier(String identifier) {
		this.identifier = identifier;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	
	public String getRoleId() {
		return roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}
	public String getUser_id() {
		return user_id;
	}

	public void setUser_id(String user_id) {
		this.user_id = user_id;
	}

	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}

	public String getTargetname() {
		if(targetname!=null)
			return targetname;
		return target;
	}

	public void setTargetname(String targetname) {
		this.targetname = targetname;
	}

	

}
